import { createVNode,render } from "vue";
import Message from "./Message.vue";
const divVNode = createVNode('div',{class :'xtx-message-container'})
render(divVNode,document.body)

const div = divVNode.el;

const MessageObj = ({message,type})=>{
    //1.动态创建虚拟DOM
    const comVNode = createVNode(Message,{message,type})
        //2.渲染虚拟DOM
    render(comVNode,div)
    //3.定时器
    setTimeout(()=>{
        render(null,div)
    },6000)
}
export default MessageObj;

